import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizApparchBizFunction = (params) => {
  params.head.transCode = 'queryBizApparchBizFunction';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/queryBizApparchBizFunction',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizApparchBizFunctionListPage = (params) => {
  params.head.transCode = 'queryBizApparchBizFunctionListPage';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/queryBizApparchBizFunctionListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizApparchBizFunction = (params) => {
  params.head.transCode = 'saveBizApparchBizFunction';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/saveBizApparchBizFunction',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizApparchBizFunctionList = (params) => {
  params.head.transCode = 'saveBizApparchBizFunctionList';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/saveBizApparchBizFunctionList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizApparchBizFunction = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchBizFunction';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/saveOrUpdateBizApparchBizFunction',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizApparchBizFunctionList = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchBizFunctionList';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/saveOrUpdateBizApparchBizFunctionList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizApparchBizFunction = (params) => {
  params.head.transCode = 'updateBizApparchBizFunction';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/updateBizApparchBizFunction',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizApparchBizFunction = (params) => {
  params.head.transCode = 'deleteBizApparchBizFunction';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/deleteBizApparchBizFunction',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizApparchBizFunctionList = (params) => {
  params.head.transCode = 'deleteBizApparchBizFunctionList';
  return request({
    url: '/biz/apparch/bizApparchBizFunction/deleteBizApparchBizFunctionList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizApparchBizFunctionExcel = (params) => {
  downloadExcel({
    url: '/biz/apparch/bizApparchBizFunction/excelDownload/exportBizApparchBizFunctionExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
